<?php 
function insert_hoadon($id_nguoidung,$tongtien,$giavon, $tonglai, $ttt)
	{
		$query = mysql_query("INSERT INTO Hoa_don SET ID_Nguoi_dung =N'".$id_nguoidung."', ID_Tinh_trang_hoa_don=1, Thoi_gian=NOW(), Tong_tien=N'".$tongtien."',  Gia_von=N'".$giavon."', Tong_lai=N'".$tonglai."', Thong_tin_them=N'".$ttt."' ");
		}
		
function insert_cthd($id_Sach, $soluong, $giaban, $gianhap, $id_hoadon, $thanhtien, $laisuat)
	{
		$query = mysql_query("INSERT INTO Chi_tiet_hoa_don 
		SET 
		ID_Sach =N'".$id_Sach."',
		So_luong=N'".$soluong."',
		Gia_ban=N'".$giaban."', 
		Gia_nhap=N'".$gianhap."', 
		ID_Hoa_don=N'".$id_hoadon."', 
		Thanh_tien=N'".$thanhtien."', 
		Lai_suat=N'".$laisuat."'");
		}
			
		
		
		
?>